﻿using NetBay.Core.BusinessEntities.Workflow;

namespace Rio.Manager.Application.Extensions
{
    public static class WorkflowActionExtensions
    {
        public static WorkflowCondition ConvertToWorkflowCondition(this WorkflowAction workflowActionToConvert)
        {
            return new WorkflowCondition()
            {
                Identifier = workflowActionToConvert.Identifier,
                Name = workflowActionToConvert.Name,
                ActionOrConditionId = workflowActionToConvert.ActionOrConditionId,
                AssemblyName = workflowActionToConvert.AssemblyName,
                ClassName = workflowActionToConvert.ClassName,
                Description = workflowActionToConvert.Description,
                IsTrigger = true
            };
        }
    }
}
